package com.xyzq.model.ya.report;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.appfuse.model.BaseObject;

import com.xyzq.model.ya.data.Staff;

public class StaffWithValidAccount extends BaseObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6406803892213183582L;
	
	private Staff staff;
	private Integer validAccount;
	private Integer validAccount5W;
	
	public StaffWithValidAccount(){
		super();
	}
	
	public StaffWithValidAccount(Staff staff){
		this.staff=staff;
		this.validAccount=0;
		this.validAccount5W=0;
	}
	@Override
	public String toString() {
		ToStringBuilder builder = new ToStringBuilder(this);
		builder.append("staff", staff);
		builder.append("validAccount", validAccount);
		builder.append("validAccount5W", validAccount5W);
		return builder.toString();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		StaffWithValidAccount other = (StaffWithValidAccount) obj;
		if (staff == null) {
			if (other.staff != null)
				return false;
		} else if (!staff.equals(other.staff))
			return false;
		if (validAccount == null) {
			if (other.validAccount != null)
				return false;
		} else if (!validAccount.equals(other.validAccount))
			return false;
		if (validAccount5W == null) {
			if (other.validAccount5W != null)
				return false;
		} else if (!validAccount5W.equals(other.validAccount5W))
			return false;
		return true;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((staff == null) ? 0 : staff.hashCode());
		result = prime * result
				+ ((validAccount == null) ? 0 : validAccount.hashCode());
		result = prime * result
				+ ((validAccount5W == null) ? 0 : validAccount5W.hashCode());
		return result;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public Staff getStaff() {
		return staff;
	}

	public void setValidAccount(Integer validAccount) {
		this.validAccount = validAccount;
	}

	public Integer getValidAccount() {
		return validAccount;
	}

	public void setValidAccount5W(Integer validAccount5W) {
		this.validAccount5W = validAccount5W;
	}

	public Integer getValidAccount5W() {
		return validAccount5W;
	}

}
